package com.example.inprinciple.singleResponsibility.test;


/**
 * 创建日期：2022/6/3 0003 16:03
 *
 * @author tony.sun
 * 类说明：
 */
public class SingleResponsibility3B {
    public static void main(String[] args) {
        Vehicle3B vehicle = new Vehicle3B();
        vehicle.userRoadBy("汽车");
        vehicle.userAirBy("飞机");
        vehicle.userWaterBy("船");
    }
}

class  Vehicle3B{
    public void userRoadBy(String name) {
        System.out.println(name+"在公路上跑");
    }
    public void userAirBy(String name) {
        System.out.println(name+"在天上飞");
    }
    public void userWaterBy(String name) {
        System.out.println(name+"在水上游");
    }
}
